// 格式化金额
export const formatMoney = (amount) => {
  return '¥' + amount.toFixed(2)
}

// 格式化日期
export const formatDate = (dateStr) => {
  const date = new Date(dateStr)
  const month = String(date.getMonth() + 1).padStart(2, '0')
  const day = String(date.getDate()).padStart(2, '0')
  const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
  const weekday = weekdays[date.getDay()]
  return `${month}-${day} ${weekday}`
}
